package com.bjpowernode.shop.controller;

import com.bjpowernode.shop.base.BaseManagerService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class FileController extends BaseManagerService {

    @PostMapping("/admin/file/upload/element")
    public ResponseEntity<String> uploadFile(@RequestParam("file") MultipartFile file){
        return ResponseEntity.ok(uploadUtils.upload(file,null));
    }
}
